import Vue from 'vue'
import Router from 'vue-router'
import ForumCom from '@/components/forumCom'
import UserCom from '@/components/userCom'
import ForumContentCom from '@/components/forumContentCom'
import ForumContentCreate from '@/components/forumContentCreate'
import HomeCom from '@/components/homeCom'
import LoginCom from '@/components/loginCom'
import GeneralCom from '@/components/generalCom'
import SubjectCom from '@/components/subjectCom'
import MyCom from '@/components/myCom'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/forum',
      name: 'ForumPath',
      components: {
        main: ForumCom,
        user: UserCom
      }
    },
    {
      path: '/forum/:id',
      name: 'ForumContentPath',
      components: {
        main: ForumContentCom,
        user: UserCom
      }
    },
    {
      path: '/forumCreate/',
      name: 'ForumCreatePath',
      components: {
        main: ForumContentCreate,
        user: UserCom
      }
    },
    {
      path: '/',
      name: 'HomePath',
      components: {
        main: HomeCom
      }
    },
    {
      path: '/login',
      name: 'LoginPath',
      components: {
        main: LoginCom
      }
    }, {
      path: '/general',
      name: 'GeneralPath',
      components: {
        main: GeneralCom,
        user: UserCom
      }
    },
    {
      path: '/subject/:id',
      name: 'SubjectPath',
      components: {
        main: SubjectCom,
        user: UserCom
      }
    },
    {
      path: '/my',
      name: 'MyPath',
      components: {
        main: MyCom,
      }
    },
  ]
})
